package com.ysl.project.im.controller;

import com.ysl.framework.web.controller.BaseController;
import com.ysl.netty.common.SessionSocket;
import com.ysl.netty.common.SocketChannelGroup;
import com.ysl.netty.common.WebSocketChannelGroup;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 姚善利
 * @classname com.ysl.project.im.controller
 * @description
 * @date 2022/7/8 9:41
 */
@Controller
@RequestMapping("/im")
public class im_controller extends BaseController {

    private String prefix = "im";
    @GetMapping()
    public String index(ModelMap mmap) {

        List<String> weblist= new ArrayList<String>();
        List<String> list = SessionSocket.likeRedisTemplate.getOnline();
        mmap.put("weblist",weblist);
        mmap.put("list",list);

        return prefix+"/index";
    }
}
